


CREATE EXTERNAL TABLE `jms_dwm`.`dwm_analysis_target_network_sum_week_dt`(
  `stat_date` string COMMENT '统计日期',
  `network_type` string COMMENT '网点类型',
  `network_code` string COMMENT '网点编码',
  `network_name` string COMMENT '网点名称',
  `franchisee_code` string COMMENT '加盟商编码',
  `franchisee_name` string COMMENT '加盟商名称',
  `agent_code` string COMMENT '代理区编码',
  `agent_name` string COMMENT '代理区名称',
  `virt_code` string COMMENT '虚拟代理区code',
  `virt_name` string COMMENT '虚拟代理区name',
  `kpi_code` string COMMENT '指标code',
  `kpi_name` string COMMENT '指标名称',
  `kpi_type` string COMMENT '指标类型,1-量值,2-率值',
  `kpi_fz` decimal(18,6) COMMENT '指标分子',
  `kpi_fm` decimal(18,6) COMMENT '指标分母',
  `kpi_values` decimal(18,6) COMMENT '指标值',
  `kpi_param` int COMMENT '指标参数(百分之,百万分之，万分之,1/100/10000)',
  `agent_principal_name` string COMMENT '代理区负责人',
  `franchisee_principal_name` string COMMENT '加盟商负责人',
  `principal_name` string COMMENT '负责人',
  `kpi_alias` string COMMENT '指标别名')
COMMENT '指标库应用网点维度周表'
PARTITIONED BY (
  `dt` string COMMENT '分区日期')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/jms_dwm.db/external/dwm_analysis_target_network_sum_week_dt'
TBLPROPERTIES (
  'bucketing_version'='2',
  'discover.partitions'='false')

